package com.itbaizhan.cxpt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itbaizhan.cxpt.entity.FileDesc;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FileDescMapper  extends BaseMapper<FileDesc> {
    @Insert("INSERT INTO file_desc (a100, a298, file_id, file_result) VALUES (#{a100}, #{a298}, #{fileId}, #{fileResult})")
    int insert(FileDesc fileDesc);

    @Select("SELECT * FROM file_desc WHERE file_id = #{fileId}")
    List<FileDesc> findByFileId(Long fileId);


    @Select("SELECT * FROM file_desc WHERE file_id = #{fileId} and file_status = 0")
    List<FileDesc> findByFileIdAndStatus(Long fileId);
} 